class AddOpenIdAuthenticationTables < ActiveRecord::Migration
  def self.up
    create_table :open_id_authentication_associations, :force => true do |t|
       t.column  :lifetime, :integer
       t.column  :assoc_type, :string
       t.column  :handle, :string
       t.column  :issued, :integer  
       t.column  :server_url , :binary 
       t.column  :secret , :binary 
    end

    create_table :open_id_authentication_nonces, :force => true do |t|
      t.column :timestamp, :integer, :null => false
      t.column :server_url,:string ,  :null => true
      t.column :salt,      :string,  :null => false
    end
  end

  def self.down
    drop_table :open_id_authentication_associations
    drop_table :open_id_authentication_nonces
  end
end
